package com.umeng.soexample.mvp.view.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.umeng.soexample.R;
import com.umeng.soexample.bean.CarListEntity;
import com.umeng.soexample.network.API;

public class AffirmOrderAdapter extends BaseQuickAdapter<CarListEntity.ValuesBean, BaseViewHolder> {

    public AffirmOrderAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, CarListEntity.ValuesBean item) {
        Glide.with(helper.itemView.getContext()).load(API.BaseUrl + item.car_path).into((ImageView) helper.getView(R.id.iv_item_affirm_order_car_path));//照片
        helper.setText(R.id.tv_item_affirm_order_shop_name, item.shop_name);//商品名
        helper.setText(R.id.tv_item_affirm_order_shop_color, "颜色 : " + item.shop_color);
        helper.setText(R.id.tv_item_affirm_order_shop_size, "尺码 : " + item.shop_size);
        helper.setText(R.id.tv_item_affirm_order_shop_price, "￥" + item.shop_price);
        helper.setText(R.id.tv_item_affirm_order_shop_num, "X "  + item.shop_num);
    }
}